<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
       $xj=2;
       $ph=1;
       $jz=3;
       $sum=($xj*7.99+$ph*6.89+$jz*3.99)*0.8;
       
        ?>
        <table width="500" border="1">
  <tbody>
    <tr>
      <td><div align="center">商品名称</div></td>
      <td><div align="center">购买数量</div></td>
      <td><div align="center">商品价格</div></td>
    </tr>
    <tr>
      <td><div align="left">香蕉</div></td>
      <td><div align="left">2</div></td>
      <td><div align="left">7.99</div></td>
    </tr>
    <tr>
      <td><div align="left">苹果</div></td>
      <td><div align="left">1</div></td>
      <td><div align="left">6.89</div></td>
    </tr>
    <tr>
      <td><div align="left">橘子</div></td>
      <td>3</td>
      <td>3.99</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>商品折扣：0.8</td>
    </tr>
    <tr>
      <td colspan="3"><div align="center"> 打折后购买商品总价格： <?php
      echo $sum
     ?> 元</div></td>
    </tr>
  </tbody>
</table>
    </body>
</html>
